package com.lottery.game.websocket;

import org.springframework.util.StringUtils;

public class WsUtils {

	private static final String KEY_PREFIX = "WSCONNECT";

	public static String buildKey(Integer serverPort, String sessionId, String userId) {
		String[] arr = new String[4];
		arr[0] = KEY_PREFIX;
		arr[1] = serverPort + "";
		arr[2] = sessionId;
		arr[3] = userId;
		return StringUtils.arrayToDelimitedString(arr , "_");
	}

}
